<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUsersCountsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users_counts', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('date');
            $table->string('date_str');
            $table->integer('sum')->default('0');
            $table->integer('grade0')->default('0');
            $table->integer('grade1')->default('0');
            $table->integer('grade2')->default('0');
            $table->integer('grade3')->default('0');
            $table->integer('grade4')->default('0');
            $table->integer('grade5')->default('0');
            $table->integer('grade6')->default('0');
            $table->integer('grade7')->default('0');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('users_counts');
    }
}
